package com.ehome.poct.core.api.dto.order;

import com.ehome.core.entity.DTO;
import com.ehome.poct.core.api.dto.report.ProfitDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @auther: kuiba.peng
 * @date: 2022/11/21 20:28
 * @description:
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class UnificationShareAccountReqDTO extends DTO {

    @NotBlank(message = "订单号不能为空")
    private String orderNo;

    @NotNull(message = "诊所ID不能为空")
    private Long clientId;

    /**
     * 需要分账的子商品信息
     */
    @Valid
    @NotEmpty(message = "子商品信息不能为空")
    private List<TestOrderItemDTO> orderItemDTOList;

    /**
     * 价格方案信息
     */
    @Valid
    @NotEmpty(message = "价格方案不能为空")
    private List<ProfitDTO> profitDTOList;

    /**
     * 预留字段
     * 是否覆盖历史分账信息
     */
    private boolean overwrite = Boolean.FALSE;
}
